/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package org.rpgmapper.tools;

import com.jme3.scene.Geometry;
import com.jme3.scene.Node;
import com.jme3.scene.Spatial;

/**
 *
 * @author Nehon
 */
public class Debug {
    
    public static void output(Spatial n,int level){
        String lv="";
        for (int i = 0; i < level; i++) {
            lv+="-";
        }
        if(n instanceof Geometry){
            Geometry g = (Geometry)n;
            System.out.println(lv+n.getName()+" - "+n.getClass()+" - "+g.getMaterial().getTextureParam("Diffuse").getTextureValue().getName());
        }else{
            System.out.println(lv+n.getName()+" - "+n.getClass());
        }
        
        
        if(n instanceof Node){
            for (Spatial child : ((Node)n).getChildren()) {
                output(child,level+1);
            }
        }
    }
    
}
